package cn.lifeaid.service;

import java.util.List;
import java.util.Set;

import cn.lifeaid.db.SysResource;

public interface SysResourceService {
	public void createResource(SysResource resource);

	public void updateResource(SysResource resource);

	public void deleteResource(Long resourceId);

	SysResource findOne(Long resourceId);

	List<SysResource> findAll();

	/**
	 * 得到资源对应的权限字符串
	 * 
	 * @param resourceIds
	 * @return
	 */
	Set<String> findPermissions(Set<Long> resourceIds);

	/**
	 * 根据用户权限得到菜单
	 * 
	 * @param permissions
	 * @return
	 */
	List<SysResource> findMenus(Set<String> permissions);
}
